A cluster is generally a concurrent or distributed system that includes some nodes (for example, computers or virtual machines) that are connected to each other. The nodes work together, run a series of common application programs, and also provide a single system mapping for a user and an application program. For example, externally, a computer cluster is a system and provides a unified service for the outside; internally, computers in the cluster are physically connected by using a cable, and are logically connected by using cluster software. A server cluster is formed by connecting multiple servers by using a communication link. Externally, the servers work like one server. Internally, external loads are dynamically allocated to the servers by using a specific mechanism, thereby achieving high performance and high availability that belong only to a super server.
A virtual machine (VM) is software running on a host. The virtual machine may create an environment between a computer platform and an end user, and the end user performs an operation based on the environment created by the software. A virtual machine cluster refers to a concurrent or distributed system that includes multiple virtual machines that are connected to each other.
A master/slave (Master/Slave) architecture is generally used for the virtual machine cluster. A master host is responsible for monitoring all slave hosts, and restarts a virtual machine on the slave host when the slave host is down. A slave node also receives a heartbeat message sent by a master node, to acknowledge whether the master node survives. If a host of the master host is down, the slave host in the cluster re-selects a master host.
As a management center of the cluster, the master host is responsible for monitoring and managing all the slave hosts in the cluster. When there are an excessively large quantity of slave hosts in the cluster, performance of the master host is insufficient to support maintenance of a large quantity of slave hosts, and consequently, the master host becomes a bottleneck of the entire cluster, and overall performance of the virtual machine cluster is deteriorated. In addition, when the master host is faulty, the slave hosts re-elect a new master host. This process needs to consume some time, thereby prolonging a fault recovery time of the cluster and deteriorating a fault tolerance capability of the virtual machine cluster. In addition, some slave hosts may lose contact with the master host. The slave hosts re-elect a master host. Consequently, two independent cluster sub-regions exist in one cluster. Therefore, each master host of the two sub-regions incorrectly considers that the other is faulty, and contends for resources, thereby causing insufficiency of resources and data damage, and deteriorating performance of the virtual machine cluster. Therefore, using a master node as a management center of a virtual machine cluster affects a fault tolerance capability and performance of the virtual machine cluster.